<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('退货单列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>订单ID 关联order.id：</p>
                                <input type="text" name="orderId"/>
                            </li>
                            <li>
                                <p>售后单id：</p>
                                <input type="text" name="aftersalesId"/>
                            </li>
                            <li>
                                <p>用户ID 关联user.id：</p>
                                <input type="text" name="userId"/>
                            </li>
                            <li>
                                <p>物流公司编码：</p>
                                <input type="text" name="logiCode"/>
                            </li>
                            <li>
                                <p>物流单号：</p>
                                <input type="text" name="logiNo"/>
                            </li>
                            <li>
                                <p>状态 1=审核通过待发货 2=已发退货 3=已收退货：</p>
                                <select name="status">
                                    <option value="">所有</option>
                                </select>
                            </li>
                            <li>
                                <p>买家备注：</p>
                                <input type="text" name="memo"/>
                            </li>
                            <li class="select-time">
                                <p>创建时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCtime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCtime]"/>
                            </li>
                            <li class="select-time">
                                <p>更新时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginUtime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endUtime]"/>
                            </li>
                            <li>
                                <p>所属店铺：</p>
                                <input type="text" name="storeId"/>
                            </li>
                            <li>
                                <p>收货地址表id：</p>
                                <input type="text" name="companyAddressId"/>
                            </li>
                            <li class="select-time">
                                <p>处理时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginHandleTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endHandleTime]"/>
                            </li>
                            <li>
                                <p>处理备注：</p>
                                <input type="text" name="handleNote"/>
                            </li>
                            <li>
                                <p>处理人员：</p>
                                <input type="text" name="handleMan"/>
                            </li>
                            <li>
                                <p>收货人：</p>
                                <input type="text" name="receiveMan"/>
                            </li>
                            <li class="select-time">
                                <p>卖家收货时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginReceiveTime]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endReceiveTime]"/>
                            </li>
                            <li>
                                <p>收货备注：</p>
                                <input type="text" name="receiveNote"/>
                            </li>
                            <li>
                                <p>退款金额：</p>
                                <input type="text" name="returnAmount"/>
                            </li>
                            <li>
                                <p>退款人姓名：</p>
                                <input type="text" name="returnName"/>
                            </li>
                            <li>
                                <p>退款人联系：</p>
                                <input type="text" name="returnPhone"/>
                            </li>
                            <li>
                                <p>null：</p>
                                <input type="text" name="logiName"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="bill:reship:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="bill:reship:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="bill:reship:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="bill:reship:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table" data-mobile-responsive="true"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('bill:reship:edit')}]];
        var removeFlag = [[${@permission.hasPermi('bill:reship:remove')}]];
        var prefix = ctx + "bill/reship";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "退货单",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'reshipId', 
                    title : '主键id',
                    visible: false
                },
                {
                    field : 'orderId', 
                    title : '订单ID 关联order.id'
                },
                {
                    field : 'aftersalesId', 
                    title : '售后单id'
                },
                {
                    field : 'userId', 
                    title : '用户ID 关联user.id'
                },
                {
                    field : 'logiCode', 
                    title : '物流公司编码'
                },
                {
                    field : 'logiNo', 
                    title : '物流单号'
                },
                {
                    field : 'status', 
                    title : '状态 1=审核通过待发货 2=已发退货 3=已收退货'
                },
                {
                    field : 'memo', 
                    title : '买家备注'
                },
                {
                    field : 'ctime', 
                    title : '创建时间'
                },
                {
                    field : 'utime', 
                    title : '更新时间'
                },
                {
                    field : 'storeId', 
                    title : '所属店铺'
                },
                {
                    field : 'companyAddressId', 
                    title : '收货地址表id'
                },
                {
                    field : 'handleTime', 
                    title : '处理时间'
                },
                {
                    field : 'handleNote', 
                    title : '处理备注'
                },
                {
                    field : 'handleMan', 
                    title : '处理人员'
                },
                {
                    field : 'receiveMan', 
                    title : '收货人'
                },
                {
                    field : 'receiveTime', 
                    title : '卖家收货时间'
                },
                {
                    field : 'receiveNote', 
                    title : '收货备注'
                },
                {
                    field : 'returnAmount', 
                    title : '退款金额'
                },
                {
                    field : 'returnName', 
                    title : '退款人姓名'
                },
                {
                    field : 'returnPhone', 
                    title : '退款人联系'
                },
                {
                    field : 'logiName', 
                    title : 'null'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.reshipId + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.reshipId + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>